package com.bop.dehong.http.model;

import java.lang.reflect.Type;

import com.base.dehong.http.HttpRequest;
import com.base.dehong.http.RequestCallBack;
import com.bop.dehong.base.DeHongApp;
import com.bop.dehong.config.Config;
import com.bop.dehong.info.EmptyInfo;
import com.google.gson.reflect.TypeToken;

import android.app.Activity;

/**
* @author Tangwenhan
*2015年11月25日下午8:28:32
*/
public class UpdateNicknameModel extends HttpRequest<EmptyInfo>{

	public UpdateNicknameModel(Activity activity, RequestCallBack<EmptyInfo> callback) {
		super(activity, callback);
		// TODO Auto-generated constructor stub
	}
	/**
	 * 更改昵称s
	 * @param nickname
	 * @param uid
	 */
	public void doNet(String uid, String nickname) {
		mPostValues.put("a", "nickname");
		mPostValues.put("m", "User");
		mPostValues.put("nickname", nickname);
		mPostValues.put("uid", uid);
		requestByPost();
	}

	@Override
	public String getURL() {
		return Config.getIP() + Config.updateNickname;
	}

	@Override
	public Type getType() {
		return new TypeToken<EmptyInfo>() {}.getType();
	}
	
	@Override
	public Class<EmptyInfo> getClazz()
	{
		return EmptyInfo.class;
	}

}

